<?php

class cmd_delivery extends mdl_delivery
{
    function getDlTypeByArea($areaid,$weight=0,$method_id=null){ //根据配送地区取得配送方式列表
        if($method_id){
            $where=' and t.dt_id = '.intval($method_id);
        }
        return $this->db->select('SELECT t.dt_id,t.dt_name,t.maxWeight,t.has_cod AS pad,t.protect,t.protect_rate,t.minprice,a.*,t.detail
                FROM sdb_dly_h_area a INNER JOIN sdb_dly_type t ON t.dt_id = a.dt_id
                WHERE t.disabled = \'false\' AND a.area_id='.intval($areaid).$where.' ORDER BY t.ordernum desc');
    }
}
?>